<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="com.resources.html">« 资源类型</a></li>
      <li style="float: right;"><a href="com.error-handling.html">Errors and error handling »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.com.html">COM</a></li>
    <li>预定义常量</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="com.constants" class="chapter">
 <h1>预定义常量</h1>

 <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
 <table class="doctable table">
  <caption><strong>COM 常量</strong></caption>
  
   <thead>
    <tr>
     <th>常量</th>
     <th>值</th>
     <th>描述</th>
     <th>说明</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.clsctx-inproc-server">
     <td>
      <strong><code>CLSCTX_INPROC_SERVER</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>1</td>
     <td>
      The code that creates and manages objects of this class is 
      a DLL that runs in the same process as the caller of the 
      function specifying the class context.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.clsctx-inproc-handler">
     <td>
      <strong><code>CLSCTX_INPROC_HANDLER</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>2</td>
     <td>
      The code that manages objects of this class is an in-process 
      handler. This is a DLL that runs in the client process and 
      implements client-side structures of this class when instances 
      of the class are accessed remotely.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.clsctx-local-server">
     <td>
      <strong><code>CLSCTX_LOCAL_SERVER</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>4</td>
     <td>
      The EXE code that creates and manages objects of this class runs on 
      same machine but is loaded in a separate process space.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.clsctx-remote-server">
     <td>
      <strong><code>CLSCTX_REMOTE_SERVER</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>16</td>
     <td>
      A remote context. The code that creates and manages objects of this 
      class is run on a different computer.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.clsctx-server">
     <td>
      <strong><code>CLSCTX_SERVER</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>21</td>
     <td>
      Indicates server code, whether in-process, local, or remote. This 
      definition ORs <strong><code>CLSCTX_INPROC_SERVER</code></strong>, 
      <strong><code>CLSCTX_LOCAL_SERVER</code></strong>, and 
      <strong><code>CLSCTX_REMOTE_SERVER</code></strong>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.clsctx-all">
     <td>
      <strong><code>CLSCTX_ALL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>23</td>
     <td>
      Indicates all class contexts. This definition ORs 
      <strong><code>CLSCTX_INPROC_HANDLER</code></strong> and 
      <strong><code>CLSCTX_SERVER</code></strong>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-null">
     <td>
      <strong><code>VT_NULL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>1</td>
     <td>
      NULL pointer reference.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-empty">
     <td>
      <strong><code>VT_EMPTY</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>0</td>
     <td>
      A property with a type indicator of <strong><code>VT_EMPTY</code></strong> has 
      no data associated with it; that is, the size of the value is zero.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-int">
     <td>
      <strong><code>VT_INT</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>22</td>
     <td>
      4-byte signed integer value (equivalent to 
      <strong><code>VT_I4</code></strong>).
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-i1">
     <td>
      <strong><code>VT_I1</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>16</td>
     <td>
      1-byte signed integer.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-i2">
     <td>
      <strong><code>VT_I2</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>2</td>
     <td>
      Two bytes representing a 2-byte signed integer value.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-i4">
     <td>
      <strong><code>VT_I4</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>3</td>
     <td>
      4-byte signed integer value.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-i8">
     <td>
      <strong><code>VT_I8</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>20</td>
     <td>
      8-byte signed integer value.
     </td>
     <td>Available as of PHP 7.0.0 (x64 only).</td>
    </tr>

    <tr id="constant.vt-uint">
     <td>
      <strong><code>VT_UINT</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>23</td>
     <td>
      4-byte unsigned integer (equivalent to 
      <strong><code>VT_UI4</code></strong>).
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-ui1">
     <td>
      <strong><code>VT_UI1</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>17</td>
     <td>
      1-byte unsigned integer.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-ui2">
     <td>
      <strong><code>VT_UI2</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>18</td>
     <td>
      2-byte unsigned integer.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-ui4">
     <td>
      <strong><code>VT_UI4</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>19</td>
     <td>
      4-byte unsigned integer.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-ui8">
     <td>
      <strong><code>VT_UI8</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>21</td>
     <td>
      8-byte unsigned integer.
     </td>
     <td>Available as of PHP 7.0.0 (x64 only).</td>
    </tr>

    <tr id="constant.vt-r4">
     <td>
      <strong><code>VT_R4</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>4</td>
     <td>
      32-bit IEEE floating point value.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-r8">
     <td>
      <strong><code>VT_R8</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>5</td>
     <td>
      64-bit IEEE floating point value.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-bool">
     <td>
      <strong><code>VT_BOOL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>11</td>
     <td>
      Boolean value.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-error">
     <td>
      <strong><code>VT_ERROR</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>10</td>
     <td>
      Error code; containing the status code associated with the 
      error.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-cy">
     <td>
      <strong><code>VT_CY</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>6</td>
     <td>
      8-byte two&#039;s complement integer (scaled by 10,000).
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-date">
     <td>
      <strong><code>VT_DATE</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>7</td>
     <td>
      A 64-bit floating point number representing the number of days 
     (not seconds) since December 31, 1899. For example, 
     <code class="literal">January 1, 1900</code>, is 2.0, <code class="literal">January 2, 1900</code>, 
     is 3.0, and so on). This is stored in the same representation as 
     <strong><code>VT_R8</code></strong>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-bstr">
     <td>
      <strong><code>VT_BSTR</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>8</td>
     <td>
      Pointer to a null-terminated Unicode string.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-decimal">
     <td>
      <strong><code>VT_DECIMAL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>14</td>
     <td>
      A decimal structure.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-unknown">
     <td>
      <strong><code>VT_UNKNOWN</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>13</td>
     <td>
      A pointer to an object that implements the IUnknown interface.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-dispatch">
     <td>
      <strong><code>VT_DISPATCH</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>9</td>
     <td>
      A pointer to a pointer to an object was specified.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-variant">
     <td>
      <strong><code>VT_VARIANT</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>12</td>
     <td>
      A type indicator followed by the corresponding value. 
      <strong><code>VT_VARIANT</code></strong> can be used only with 
      <strong><code>VT_BYREF</code></strong>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-array">
     <td>
      <strong><code>VT_ARRAY</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>8192</td>
     <td>
      If the type indicator is combined with 
      <strong><code>VT_ARRAY</code></strong> by an OR operator, the value is a pointer to a 
      <code class="literal">SAFEARRAY</code>. <strong><code>VT_ARRAY</code></strong> 
      can use the OR with the following data types: <strong><code>VT_I1</code></strong>, 
      <strong><code>VT_UI1</code></strong>, <strong><code>VT_I2</code></strong>, <strong><code>VT_UI2</code></strong>, 
      <strong><code>VT_I4</code></strong>, <strong><code>VT_UI4</code></strong>, <strong><code>VT_INT</code></strong>, 
      <strong><code>VT_UINT</code></strong>, <strong><code>VT_R4</code></strong>, <strong><code>VT_R8</code></strong>, 
      <strong><code>VT_BOOL</code></strong>, <strong><code>VT_DECIMAL</code></strong>, <strong><code>VT_ERROR</code></strong>, 
      <strong><code>VT_CY</code></strong>, <strong><code>VT_DATE</code></strong>, <strong><code>VT_BSTR</code></strong>, 
      <strong><code>VT_DISPATCH</code></strong>, <strong><code>VT_UNKNOWN</code></strong> and 
      <strong><code>VT_VARIANT</code></strong>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.vt-byref">
     <td>
      <strong><code>VT_BYREF</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>16384</td>
     <td>
      If the type indicator is combined with <strong><code>VT_BYREF</code></strong> 
      by an OR operator, the value is a reference. Reference types are 
      interpreted as a reference to data, similar to the reference type in 
      C++.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-acp">
     <td>
      <strong><code>CP_ACP</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>0</td>
     <td>
      默认为 ANSI 编码页。
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-maccp">
     <td>
      <strong><code>CP_MACCP</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>2</td>
     <td>
      Macintosh code page.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-oemcp">
     <td>
      <strong><code>CP_OEMCP</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>1</td>
     <td>
      默认为 OEM 编码页。
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-utf7">
     <td>
      <strong><code>CP_UTF7</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>65000</td>
     <td>
      Unicode (UTF-7).
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-utf8">
     <td>
      <strong><code>CP_UTF8</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>65001</td>
     <td>
      Unicode (UTF-8).
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-symbol">
     <td>
      <strong><code>CP_SYMBOL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>42</td>
     <td>
      <code class="literal">SYMBOL</code> translations.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.cp-thread-acp">
     <td>
      <strong><code>CP_THREAD_ACP</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>3</td>
     <td>
      当前线程的 ANSI 编码页
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.varcmp-lt">
     <td>
      <strong><code>VARCMP_LT</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>0</td>
     <td>
      The left <code class="literal">bstr</code> is less than right 
      <code class="literal">bstr</code>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.varcmp-eq">
     <td>
      <strong><code>VARCMP_EQ</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>1</td>
     <td>
      The two parameters are equal.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.varcmp-gt">
     <td>
      <strong><code>VARCMP_GT</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>2</td>
     <td>
      The left <code class="literal">bstr</code> is greater than right 
      <code class="literal">bstr</code>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.varcmp-null">
     <td>
      <strong><code>VARCMP_NULL</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>3</td>
     <td>
      Either expression is NULL.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignorecase">
     <td>
      <strong><code>NORM_IGNORECASE</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>1</td>
     <td>
      Ignore case sensitivity.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignorenonspace">
     <td>
      <strong><code>NORM_IGNORENONSPACE</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>2</td>
     <td>
      Ignore nonspacing characters.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignoresymbols">
     <td>
      <strong><code>NORM_IGNORESYMBOLS</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>4</td>
     <td>
      Ignore symbols.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignorewidth">
     <td>
      <strong><code>NORM_IGNOREWIDTH</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>131072</td>
     <td>
      Ignore string width.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignorekanatype">
     <td>
      <strong><code>NORM_IGNOREKANATYPE</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>65536</td>
     <td>
      Ignore Kana type.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.norm-ignorekashida">
     <td>
      <strong><code>NORM_IGNOREKASHIDA</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>262144</td>
     <td>
      Ignore Arabic kashida characters.
     </td>
     <td>
      Availability is dependent upon under lying library.
     </td>
    </tr>

    <tr id="constant.disp-e-divbyzero">
     <td>
      <strong><code>DISP_E_DIVBYZERO</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>-2147352558</td>
     <td>
      A return error that indicates a divide by zero error.
     </td>
     <td>As of PHP 7.0.0, the value is <code class="literal">2147614738</code> on x64.</td>
    </tr>

    <tr id="constant.disp-e-overflow">
     <td>
      <strong><code>DISP_E_OVERFLOW</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>-2147352566</td>
     <td>
      An error that indicates that a value could not be coerced to 
      its expected representation.
     </td>
     <td>As of PHP 7.0.0, the value is <code class="literal">2147614730</code> on x64.</td>
    </tr>

    <tr id="constant.disp-e-badindex">
     <td>
      <strong><code>DISP_E_BADINDEX</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>-2147352565</td>
     <td>
      An error that indicates that an array index does not exist.
     </td>
     <td>As of PHP 7.0.0, the value is <code class="literal">2147614731</code> on x64.</td>
    </tr>

    <tr id="constant.mk-e-unavailable">
     <td>
      <strong><code>MK_E_UNAVAILABLE</code></strong>
      (<span class="type">int</span>)
     </td>
     <td>-2147221021</td>
     <td>
      iMoniker COM status code, return on errors where the function call 
      failed due to unavailability.
     </td>
     <td>As of PHP 7.0.0, the value is <code class="literal">2147746275</code> on x64.</td>
    </tr>

   </tbody>
  
 </table>

</div>
</div></div></body></html>